Absolutely must not return to HVM guest context until
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 13 Feb 2006 11:16:16 +0000 (12:16 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 13 Feb 2006 11:16:16 +0000 (12:16 +0100)
synchronous I/O emulation is completed.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/vmx/io.c

index 996c4deaa15b1bb5098c786fcc2ee2f593763ef9..6c56e58127e2bbb118d3fc78a71da20a4b6ca1a8 100644 (file)
@@ -489,7 +489,8 @@ void svm_do_resume(struct vcpu *v)
 {
     struct hvm_virpit *vpit = &v->domain->arch.hvm_domain.vpit;
     
-    if ( event_pending(v) )
+    if ( event_pending(v) ||
+         test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) )
         hvm_wait_io();
 
     /* pick up the elapsed PIT ticks and re-enable pit_timer */
index ac2a6b60c54601dc0e5a4e8fdd8497985ede6625..b36ceb15f67500b8232ff6827f43b82d791e653b 100644 (file)
@@ -177,7 +177,8 @@ void vmx_do_resume(struct vcpu *v)
 
     vmx_stts();
 
-    if ( event_pending(v) )
+    if ( event_pending(v) ||
+         test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) )
         hvm_wait_io();
 
     /* pick up the elapsed PIT ticks and re-enable pit_timer */